module(
    name = "rules_detekt",
    version = "0.8.1.2",
    compatibility_level = 1,
    repo_name = "bazel_rules_detekt",
)

register_toolchains("//detekt:default_toolchain")

detekt = use_extension("//detekt:extensions.bzl", "detekt")
use_repo(detekt, "detekt_cli_all")

bazel_dep(name = "rules_java", version = "5.5.0")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "rules_jvm_external", version = "5.3")
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
    name = "rules_detekt_dependencies",
    artifacts = [
        "com.squareup.moshi:moshi:1.14.0",
        "com.squareup.okio:okio-jvm:3.2.0",
        "io.reactivex.rxjava3:rxjava:3.0.12",
        "junit:junit:4.13.2",
        "io.gitlab.arturbosch.detekt:detekt-formatting:1.23.1",
    ],
    fail_if_repin_required = True,
    lock_file = "//:maven_install.json",
)
use_repo(maven, "rules_detekt_dependencies", "unpinned_rules_detekt_dependencies")

bazel_dep(name = "bazel_skylib", version = "1.4.1", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.5.3", repo_name = "io_bazel_stardoc", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "6.3.3", dev_dependency = True)
